import java.util.Scanner;

public class Q002成绩统计 {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int N,a=0,b=0;
        N = scan.nextInt();
        int[] grade = new int[N];
        for (int i = 0; i < N; i++) {
            grade[i] = scan.nextInt();
        }
        for (int i = 0; i < N; i++) {
            if(grade[i] >= 85){
                a++;
                b++;
            }else if(grade[i] >= 60){
                b++;
            }else {
                continue;
            }
        }
        System.out.println( Math.round((double) b*100/N)+"%");
        System.out.println( Math.round((double)a*100/N)+"%");
        scan.close();
    }
}
